package com.xgq.drink.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.Version;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 商品实体类
 * </p>
 *
 * @author xgq
 * @since 2025-02-23
 */
@Getter
@Setter
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "product_id", type = IdType.AUTO)
    private Long productId;

    private String name;

    private String description;

    private BigDecimal price;

    private Long categoryId;

    private String brand;

    private String imageUrl;

    private String videoUrl;

    private String detailInfo;

    private LocalDateTime createdAt;

    private LocalDateTime updatedAt;

    private String applyAge;

    private Long brandId;
    //库存
    private Integer quantity;

    @TableField(exist = false)
    private Integer buyNum;
    /**
     * 优惠信息
     */
    @TableField(exist = false)
    private Long discountId;
    private Integer isDel;
    @TableField(exist = false)
    private Integer score;

    // 乐观锁版本号字段
    @Version
    @TableField("version")
    private Integer version;
    private Long attributeId;
}